You are on page 1of 12

Scripting Languages

lolwut?

Chris Oliver
http://excid3.com
http://twitter.com/excid3
What is scripting?
High level languages
Python
Ruby
Perl
PHP

Interpreted, not compiled

Rapid development
Why?
Advantages
Beautiful Syntax

Garbage collection

Simplicity
Native Data Types
C++ Python
Bool You don’t have to declare
Char data types and everything is
an object!
Int
Integers
Double
Strings
Float
Tuples: (1,2,3)
Arrays: [1,2,3]
Dictionaries:
x ={“a”: true, “b”: 234}
x[“a”] = false
Scripting is convenient
Lists are very easy use

Assign multiple variables at once


List filtering
Ridiculously clean

count is a method that returns the number of times an element is


in a list
File Handling
Opening a Non-existent file
File Handling
Writing to a file

Reading lines in a file


Iterating over a string
Lets print out a string, one character at a time

C++

Python
Nifty Python Tricks
map – apply a function to every item in a list and return them

Chain comparison operators

If-Then variable assignment

(If y is 1 then assign 3 to x, otherwise assign 2 to x)


Scripting is for ballers
You don’t always need the speed of something like C++

Scripting provides
Rapid development
Clean code
Overall awesomeness

Useful for
Most websites are built on PHP, Python, or Ruby
Desktop applications
Application prototypes
Scripting is less stressful!
Profanity in version control commits by language

Source:
http://andrewvos.com/2011/02/21/amount-of-profanity-in-git-commit-messages-per-programming-la
nguage
/

You might also like